From: Owen W. Taylor Date: Thu, 31 Mar 2011 19:51:38 +0000 (-0400) Subject: Fix expand animation for submenus X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8383 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=82e2ab89c517b2d9b270d598f8ebf5245a22cf18;p=gnome-shell.git Fix expand animation for submenus Figuring out the size of an unmapped actor is not completely reliable because styles aren't fully assigned until an actor is mapped. So show the submenu before computing the size we want to tween to. https://bugzilla.gnome.org/show_bug.cgi?id=645949 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 99e7a336d..1f31c18a4 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -1059,9 +1059,9 @@ PopupSubMenu.prototype = { // we don't implement the !animate case because that doesn't // currently get used... + this.actor.show(); let [naturalHeight, minHeight] = this.actor.get_preferred_height(-1); this.actor.height = 0; - this.actor.show(); this.actor._arrow_rotation = this._arrow.rotation_angle_z; Tweener.addTween(this.actor, { _arrow_rotation: 90,